From 4c9df8c1d34e78c95d2a97be2e07319fae8980aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Wed, 29 Aug 2018 15:27:08 +0200 Subject: [PATCH] babl: skip initial profiling for planar conversions --- babl/babl-conversion.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/babl/babl-conversion.c b/babl/babl-conversion.c index 136d91f..1127c00 100644 --- a/babl/babl-conversion.c +++ b/babl/babl-conversion.c @@ -493,10 +493,19 @@ babl_conversion_error (BablConversion *conversion) babl_process (fish_rgba_to_source, test, source, test_pixels); - ticks_start = babl_ticks (); - babl_process (babl_fish_simple (conversion), - source, destination, test_pixels); - ticks_end = babl_ticks (); + if (BABL(conversion)->class_type == BABL_CONVERSION_LINEAR) + { + ticks_start = babl_ticks (); + babl_process (babl_fish_simple (conversion), + source, destination, test_pixels); + ticks_end = babl_ticks (); + } + else + { + /* we could still measure it, but for the paths we only really consider + * the linear ones anyways */ + ticks_end = 1000; + } babl_process (fish_reference, source, ref_destination, test_pixels); -- 2.30.2